<html ng-app="docsTabsExample" >
<head>
<script src="../AngularJS/angular-1.5.0/angular.min.js"></script>
</head>
<body  ng-controller="ctrl">
  
  <div widget data={{data}}></div>
  <div widget ></div>
  <div widget ></div>

<script>
var app=angular.module('docsTabsExample', []);
app.controller("ctrl",function($scope){
//	ng-init="data='ddddddddd'"
		$scope.dd = 'dddddd';
});
app.directive('widget', function() {
  return {
    restrict:"A",
    scope:{
    	name:'@',
    	dd:'@'
    },
    scope:{},
    template:"{{name}}<input type='text' ng-model='name'/>",
    link:function(scope,element,attr){
    		console.log(111)
    		scope.obj='xxxxxxxxxx';
    		console.log(data)
    },
    controller:function($scope){
    	console.log(2222)
			console.log($scope.name)
			console.log($scope.obj)
			console.log($scope.dd)
		
    }

  }  
});
</script>
</body>
</html>